package file;

import java.io.File;

public class FileDemo {
    public static void main(String[] args) {
        File file = new File("./demo.text");
        long length = file.length();
        System.out.println(length);
        System.out.println(file.getName());
        System.out.println(file.getClass());

        boolean canRead = file.canRead();
        boolean canWrite = file.canWrite();
        System.out.println("可读："+canRead);
        System.out.println("可写："+canWrite);
        boolean hidden = file.isHidden();
        System.out.println("是否隐藏："+hidden);
    }
}
